package com.cyz.user.controller;

import com.cyz.user.userService.ButtongroupService;
import com.cyz.user.userService.ShopTypeService;
import com.cyz.common.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//TODO: 权限管理没做

@Api(tags = "用户端按钮相关接口")
@RestController
@RequestMapping("/button")
public class ButtonController {

    @Autowired
    private ButtongroupService buttongroupService;
    @Autowired
    private ShopTypeService shopTypeService;

    @ApiOperation(value = "查询免费课程按钮分类及其包含的按钮")
    @GetMapping("/queryFreeButtonGroupsAndButtons")
    public R queryFreeButtonGroupsAndButtons() {
        return buttongroupService.queryFreeButtonGroupsAndButtons();
    }

    @ApiOperation(value = "查询付费课程按钮及其包含的课程")
    @GetMapping("/queryShopTypesAndShops")
    public R queryShopTypesAndShops() {
        return shopTypeService.queryShopTypesAndShops();
    }

}
